<%@ tag pageEncoding="UTF-8"%>
<%@ taglib uri="http://tiles.apache.org/tags-tiles" prefix="t"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<%@ taglib prefix="tags" tagdir="/WEB-INF/tags"%>
<%@ taglib prefix="s" uri="http://www.springframework.org/tags" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<c:url value="/attachment/download" var="downloadUrl" />
<c:url value="/j_spring_security_logout" var="logoutUrl"/>
<c:url value="/resources/html/images" var="images" />
<div class="Login_info">
	<ul class="photo_info">
		<li class="photo">
			<c:choose>
				<c:when
					test="${empty clientAllDataDTO.getProfile_img_seq() or clientAllDataDTO.getProfile_img_seq() == 0}">
					<img src="${images}/no_image.jpg" width="50" height="50" />
				</c:when>
				<c:otherwise>
					<img src="${downloadUrl }/${clientAllDataDTO.getProfile_img_seq()}"
						width="50" height="50" id="myimg" name="myimg" />
					<div id="tempImgArea" align="center"></div>
					<script type="text/javascript">
						$("#myimg").bind("load", function() {
							$(this).attr({
								alt : "클릭하시면 원본 사이즈로 보실 수 있습니다."
							}).css({
								cursor : "pointer"
							}).on("click", function() {
								var maxSize = 500;
								var imgcopy = $("#myimg").clone();
								imgcopy.removeAttr("width");
								imgcopy.removeAttr("height");
								$("#tempImgArea").append(imgcopy);
								imgcopy.css({
									width : maxSize + "px",
								});

								$("#tempImgArea").dialog({
									width : imgcopy.width() + 50,
									modal : true,
									position : "top"
								}).on("click", function() {
									$("#tempImgArea").dialog("close");
									$("#tempImgArea").html("");
								});
							});
						});
					</script>
				</c:otherwise>
			</c:choose>
		</li>
		<li class="photo_text"><strong>${clientAllDataDTO.getUser_kr() }</strong>님<br />환영합니다.</li>
	</ul>
	<ul class="info_type">
		<li class="FontWeightBold">- <strong>${clientAllDataDTO.getDepartment().getDepartment_name()
				}</strong></li>
		<li>- ${clientAllDataDTO.getRank().getRank_name() } /
			${clientAllDataDTO.getPosition().getPosition_name() }</li>
		<li class="infoline"><img src="${images}/login_dotline.gif" /></li>
		<li class="day"><img src="${images}/icon_2.png" alt="시계아이콘"
			width="19" height="19" /> 최근 접속<br /> <c:choose>
				<c:when test="${!empty clientAllDataDTO.getLastLogin() }">
					<fmt:formatDate
						value="${clientAllDataDTO.getLastLogin().getLogin_date() }"
						pattern="yyyy.MM.dd HH:mm" />
				</c:when>
				<c:otherwise>접속 기록 없음</c:otherwise>
			</c:choose></li>
	</ul>
</div>
